import request from '@/utils/request'
const baseUrl = '/mall/user'

export function getUserByToken() {
  return request({
    url: `${baseUrl}/getTokenByHttp`,
    method: 'get'
  })
}

export function getUserById(id) {
  return request({
    url: `${baseUrl}/getById/${id}`,
    method: 'get'
  })
}

export function updateUser(user) {
  return request({
    url: `${baseUrl}/updateById`,
    method: 'put',
    data: user
  })
}
